home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5836 < prev    next >
Encoding:
Text File  |  1996-08-05  |  945 b   |  35 lines

  1. Path: news.compuserve.com!newsmaster
  2. From: <72421.1131@compuserve.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Constructor Called for Global Class Instance
  5. Date: 7 Feb 1996 03:04:18 GMT
  6. Organization: CompuServe Incorporated
  7. Message-ID: <4f94ri$12p@dub-news-svc-3.compuserve.com>
  8. NNTP-Posting-Host: ad32-170.compuserve.com
  9. Content-Type: text/plain
  10. Keywords: C++ Constructor
  11. Content-length: 520
  12. X-Newsreader: AIR Mosaic (16-bit) version 4.00.08.32
  13.  
  14.  
  15. A quick question pertaining to the following snippet of code:
  16.  
  17. // Snipet
  18. #include "MyClass.h"
  19. MyClass junk;
  20.  
  21. int main(int ac, char **av)
  22. {
  23.  
  24. etc....
  25.  
  26. Given that there is a constructor MyClass(), if I load this sucker up in a debugger
  27. and set a breakpoint in the constructor function, should I break in the function? In 
  28. other words, does the constructor of a class get called when the class is
  29. defined outside of an executed function?
  30.  
  31. And if this is a RTF FAQ, sorry; please point to the FAQ.
  32.  
  33. TIA
  34. TIA
  35.